package cn.stylefeng.guns.topspeedCarRace;

import cn.hutool.db.DbUtil;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;

import javax.sql.DataSource;

/**
 * @Description TODO
 * @Author xiesm
 * @Date 2023/2/10 10:00
 **/
public class Ao83 {
    public static void main(String[] args) {
        read();
    }

    public static void read() {
        String url = "https://api.api68.com/LotteryPlan/getKlsfPlanList.do?lotCode=10011&rows=0&date=2023-02-13";
        //String url = "https://api.api68.com/LotteryPlan/getKlsfPlanList.do?lotCode=10011&rows=10&date=2023-02-10";
        String res = HttpUtil.get(url);
        System.out.println(res);
        JSONObject object = JSONObject.parseObject(res);
        String pretty = JSON.toJSONString(object, SerializerFeature.PrettyFormat, SerializerFeature.WriteMapNullValue,
                SerializerFeature.WriteDateUseDateFormat);

        System.out.println(pretty);

    }
}
